package com.citms.consul.startup;

import com.citms.common.Constant;
import com.citms.consul.service.Deregister;
import com.citms.consul.service.Discovery;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class ServiceInfoStarter implements CommandLineRunner {

    @Autowired
    Discovery discovery;

    @Autowired
    Deregister deregister;

    @Override
    public void run(String... args){
        log.info("【{}】当前存在的服务----------------------:" + discovery.getServices(), Constant.SERVICE_NAME);
    }
}
